Just as the title states, I’m trying to map incoming data to create a Work Note entry but am having no luck doing so.
Context:
PagerDuty webhook type: trigger
Type: Set from PagerDuty webook payload
ServiceNow Incident field: Work Notes
Run lookup script: checked
The code I’m using for the lookup script is below:
var details = JSON.stringify(value, null, 2);
result = details;
The ‘value’ variable contains a JSON object that needs to be serialized so that it can be printed. If it’s not serialized, it will return ‘Object object’.
I’ve confirmed that the payload data is passing through the variables successfully by setting the ‘ServiceNow Incident Filed’ to ‘Description’. The data shows up there no problem when a test ticket is created. But when I try to map it to ‘Work Notes’, no work notes are created.
Any help on this issue is greatly appreciated.